package RJ;

import java.util.*;

public class PersonTable {
	
	private HashMap<String, Person> PT;
	Iterator iter = null;
	
	public Iterator getIter() {		
		return iter = getPT().values().iterator();
	}

	public void setIter(Iterator iter) {
		this.iter = iter;
	}

	public PersonTable(){
		setPT(new HashMap<String, Person>());
	}
	
	public void insert(String p){
		getPT().put(p, new Person(p));
	}

	public boolean selectName(String p) {
		return getPT().containsKey(p);
	}

	public Person getPerson(String p) {
		return getPT().get(p);
	}
	@Override
	public String toString(){
		return getPT().toString();		
	}

	public HashMap<String, Person> getPT() {
		return PT;
	}

	public void setPT(HashMap<String, Person> pT) {
		PT = pT;
	}
	
	public int getSize(){
		return PT.size();
	}

}
